<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    div > div {
      width: 200px;
      height: 100px;
    }
    .active {
      background-color: green;
    }
    .text-danger {
      color: orange;
    }
  </style>
</head>
<body>

<div id="app">
  <!-- 数组放类名字符串 -->
  <div class="static" v-bind:class="['active', 'text-danger']">class数组语法</div>
  <hr>
  <!-- 数组放类名变量 -->
  <div class="static" v-bind:class="[activeClass, errorClass]">class数组语法</div>
  <hr>
  <!-- 类名变量和类名字符串一起放 -->
  <div class="static" v-bind:class="[activeClass, 'text-danger']">class数组语法</div>
</div>

<script src="../lib/vue.js"></script>
<script>
  let vm = new Vue({
    el: '#app',
    data: {
      activeClass: 'active',
      errorClass: 'text-danger'
    }
  })
</script>

</body>
</html>